package com.sky.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * 任务类
 */
@Component
@Slf4j
public class MyTask {

    /**
     * 每隔五秒执行一次任务
     */
    // @Scheduled(cron = "0/5 * * * * ?")
    public void taskTest(){
        log.info("执行时间：{}", LocalDateTime.now());
    }
}
